<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .message-box {
            width: 300px;
            padding: 10px 20px;
            color: white;
            background: rgb(2, 214, 133);
        }
        .message-box-close {
            float: right;
            color: white;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="message-box" v-show="isShow">
            {{msgTitle}}
            <strong>{{msgContent}}</strong>
            <span class="message-box-close" @click="isShow=false">X</span>
        </div>
    </div>
    </div>
    <script src="../assets/vue2.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data() {
                return {
                    isShow: true,
                    msgTitle: '温馨提示：',
                    msgContent: '操作成功'
                }
            },
        })
    </script>
</body>

</html>